const http = require("http")

const server2 = new http.Server((req, res) => {
  res.end("hello server11asdasd")
})
// server2.listen(8000, 'localhost', () => {
//   console.log("服务器启动成功");
//   console.log(server2.address().port);
// })


//0.0.0.0可以监听ipv4地址
server2.listen(8000, '0.0.0.0', () => {
  console.log("服务器启动成功");
  console.log(server2.address().port);
})